/**花卉广场相关接口 */
import myaxios from "../MyAxios";
import URLENV from '@/http/BaseUrl';
const HYRJURL = URLENV.HYRJURL
const shareApi = {
  /**
   * 分页获取分享列表
   * @param {object} params {page:obj,pagesize:obj}
   */
  getList(params) {
    const url = HYRJURL + '/shareflower/getAll'
    return myaxios.get(url,params)
  },
  /**
   * 模糊查询分享
   * @param {object} params {wd:obj}
   */
  getListByNameLike(params) {
    const url = HYRJURL + '/shareflower/getByNameLike'
    return myaxios.get(url,params)
  },
  /**
   * 通过用户名查询分享
   * @param {object} params {wd:obj}
   */
  getByUserName(params) {
    const url=HYRJURL+'/shareflower/getByUserName'
    return myaxios.get(url,params)
  },
  /**
   * 通过share_id查询分享
   * @param {object} params {share_id:num}
   */
  getByShareId(params) {
    const url = HYRJURL + '/shareflower/getByShareId'
    return myaxios.get(url,params)
  },
  /**
   * 通过share_id查询评论
   * @param {object} params {comment_share_id: num}
   */
  getCommentByShareId(params) {
    const url = HYRJURL + '/sharecomment/getByshareid'
    return myaxios.get(url,params)
  },
  /**
   * 改变分享显示
   * @param {object} params {share_show：（0，1），share_warn：string ,share_id:num}
   */
  changeShow(params) {
    const url = HYRJURL + '/shareflower/update'
    return myaxios.post(url,params)
  },
  /**
   * 删除评论
   * @param {object} params {comment_id：num}
   */
  deleteComment(params) {
    const url = HYRJURL + '/sharecomment/delete'
    return myaxios.get(url,params)
  },
  /**
   * 通过用户Id查询分享
   * @params {obj} {id：unm}
   */
  getShareListByUserId(params) {
    const url = HYRJURL + '/shareflower/getByUserId'
    return myaxios.get(url,params)
  },
}
export default shareApi;